package com.christina.dto;

import lombok.Data;
import java.time.LocalDateTime;

/**
 * 任务消息DTO
 * 
 * @author Christina
 */
@Data
public class TaskMessage {
    
    /**
     * 任务ID
     */
    private Long taskId;
    
    /**
     * 用户ID
     */
    private Long userId;
    
    /**
     * 任务类型
     */
    private String taskType;
    
    /**
     * 任务数据
     */
    private Object taskData;
    
    /**
     * 优先级 (1-10, 数字越大优先级越高)
     */
    private Integer priority = 5;
    
    /**
     * 重试次数
     */
    private Integer retryCount = 0;
    
    /**
     * 最大重试次数
     */
    private Integer maxRetries = 3;
    
    /**
     * 创建时间
     */
    private LocalDateTime createTime;
    
    /**
     * 预期执行时间
     */
    private LocalDateTime scheduleTime;
    
    public TaskMessage() {
        this.createTime = LocalDateTime.now();
        this.scheduleTime = LocalDateTime.now();
    }
    
    public TaskMessage(Long taskId, Long userId, String taskType, Object taskData) {
        this();
        this.taskId = taskId;
        this.userId = userId;
        this.taskType = taskType;
        this.taskData = taskData;
    }
}